Address user-reported secret leak, RPC proxy retry, and watchdog container issues - #27
Open
stephenctw wants to merge 3 commits into
Open
Address user-reported secret leak, RPC proxy retry, and watchdog container issues#27stephenctw wants to merge 3 commits into
stephenctw wants to merge 3 commits into
Conversation
…chdog LUA_CPATH - Add `hide_env_values = true` to all private-key and key-file CLI args (KeyArgs + OptionalKeyArgs) so `--help` prints the env var name but never the value. Also hide BLOCKCHAIN_HTTP_ENDPOINT (may contain API tokens in the URL). Closes F1 from the security audit. - Add -32012 to DEFAULT_LONG_BLOCK_RANGE_ERROR_CODES in the sequencer (Rust) and watchdog (Lua), plus the shared test fixture. This code is returned by JSON-RPC proxies when getLogs exceeds max allowed range; the partition retry now bisects on it automatically. - Fix watchdog entrypoint (sequencer-watchdog): append the cartesi deb Lua paths as fallbacks instead of prepending, so the container's /opt/watchdog/lib/lcurl.so is found first. - Add regression tests: help output must not leak secret env values, -32012 must be in default codes and trigger retry, fixture scenario for proxy range-exceeded bisect.
- Document the conscious accept of bare -32012 in the partition default
list (same overload model as existing -32005; no message heuristics).
- Rewrite help-leak regression as a child-process probe via Command::env
so parallel cargo test no longer mutates process-global env.
- Join watchdog LUA_{C,}PATH appends with an explicit ';' and derive the
base from versioned-or-unversioned (Lua 5.4).
- Update README default for LONG_BLOCK_RANGE_ERROR_CODES to include -32012.
The trailing-semicolon trim used `[[ == *' ; ]]` with a broken quote, so bash treated later `printf '%s;;'` as inside the conditional and aborted every sequencer-watchdog init with unexpected token `;;`. Trim via `case` instead and keep the explicit `;` join.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hide secrets in --help, add -32012 retry code, fix watchdog LUA_CPATH
Add
hide_env_values = trueto all private-key and key-file CLI args (KeyArgs + OptionalKeyArgs) so--helpprints the env var name but never the value. Also hide BLOCKCHAIN_HTTP_ENDPOINT (may contain API tokens in the URL). Closes F1 from the security audit.Add -32012 to DEFAULT_LONG_BLOCK_RANGE_ERROR_CODES in the sequencer (Rust) and watchdog (Lua), plus the shared test fixture. This code is returned by JSON-RPC proxies when getLogs exceeds max allowed range; the partition retry now bisects on it automatically.
Fix watchdog entrypoint (sequencer-watchdog): append the cartesi deb Lua paths as fallbacks instead of prepending, so the container's /opt/watchdog/lib/lcurl.so is found first.
Add regression tests: help output must not leak secret env values, -32012 must be in default codes and trigger retry, fixture scenario for proxy range-exceeded bisect.